1. Field of the Invention
The present invention relates to a printer and a printing method in which data is transmitted to and from a host computer through handshaking to print necessary print data, and to a recording medium which stores a program realizing such a printing method.
2. Related Background Art
A printer which uses an interface conforming with Centronics sequentially receives print data (including printer control commands) from a host computer through handshaking and prints it out. With handshaking, print data is received at a timing of an STBX (strobe) signal, and a BUSY (during data reception) or an ACKX (reception completion) is returned back to the host computer to make it stand by or transmits the next print data.
A conventional data transmission speed is as slow as about 20 xcexcsec per one byte as shown in FIG. 18, because of a low data processing ability of a host computer or printer. From this reason, the width of an ACKX signal returned from the printer back to the host computer is set to be about 4 xcexcsec, by taking into account the data transmission speed, a process time required by a noise filter during transmission, and the like.
Some host apparatuses neglect the ACKX signal. Recent host apparatuses in particular have this technical tendency.
As the resolution of a printer is improved nowadays, the print data amount increases so that the data transmission speed is desired to be raised. As CPUs and memories increase their speeds, the data processing ability of a host computer or printer has been improved considerably. Data from a host computer is generally received through DMA. As shown in FIG. 19, it takes therefore only about 300 nsec to return a BUSY signal at a timing t3 after an STBX signal is received at a timing t2 and takes only about 200 nsec to finish data read at a timing t4 after the data read starts at the timing t3. The printer process therefore ends at the timing t4. An increase of the data transmission speed has therefore been suppressed because of a bottle neck of an ACKX signal width of about 4 xcexcsec from the timing t4 to a timing t5.
There is another problem associated with the above-described conventional techniques as in the following. As described earlier, a printer connected via a Centronics interface to a host apparatus is required to output an ACKX signal to the host apparatus regardless of that not all host apparatuses require the ACKX signal. Therefore, the time when the next data can be received becomes unnecessarily long if the host apparatus connected via a Centronics interface to a printer does not require the ACKX signal, resulting in a degraded throughput.
The present invention has been made under the above-described background art. It is an object of the present invention to increase a data transmission speed from a host computer to a printer as much as possible, depending upon the performance of the host computer and printer.
It is another object of the present invention to provide a printer capable of a high speed data reception and an improved throughput by making the printer acquire information of an ACKX signal necessity of a host apparatus.
In order to solve the above problems, the invention provides a printer which comprises means for transmitting a predetermined response signal when data is received from a higher hierarchical apparatus, and control means for controlling the printer to determine an optimum response time of the predetermined response signal.